#!/bin/bash
N=`dirname $0`
HOME=`cd $N;pwd`

while true
do
    inspect_month=`date +%Y-%m`
    inspect_day=`date +%Y-%m-%d`
    inspect_time=`date +%H:%M`
    log=$inspect_day.html
    $HOME/inspect  >>$log
    ssh 10.11.96.20 "mkdir /opt/huawei/webserver/nginx/html/inspect/$inspect_month"
    scp $log 10.11.96.20:/opt/huawei/webserver/nginx/html/inspect/$inspect_month  >/dev/null 2>&1
    sleep 1 
    rm $log
    sleep 86400
done
